package com.greateffect.littlebud.lib.net;


/**
 * Created by ZengCS on 2019/1/17.
 * E-mail:zengcs@vip.qq.com
 * Add:成都市天府软件园E3
 */

public class ServerHostManager {
    public static final int ENVIRONMENT_BETA_DEV = 0;// 开发环境
    public static final int ENVIRONMENT_BETA_TEST = 1;// 测试环境
    public static final int ENVIRONMENT_RELEASE_PRE = 2;// 预发布环境
    public static final int ENVIRONMENT_RELEASE = 3;// 生产环境

    private static int sCurrApiVersion = 3;

    public static void resetApiVersion(int newVersion) {
        sCurrApiVersion = newVersion;
    }

    private static final String[] BASE_HOST = {
            "api.dev.sxw.cn",   // 开发环境域名
            "apio.test.sxw.cn", // 测试环境域名
            "api.pre.sxw.cn",  // 预发布环境域名
            "api.sxw.cn"      // 生产环境
    };

    public static String getServerHost() {
        return BASE_HOST[sCurrApiVersion];
    }
}
